Skip to content

GridCore: add ai assistant toolbar item#33189

Open
anna-shakhova wants to merge 4 commits intoDevExpress:26_1from
anna-shakhova:26_1__ai_assistant_toolbar_item
Open

GridCore: add ai assistant toolbar item#33189
anna-shakhova wants to merge 4 commits intoDevExpress:26_1from
anna-shakhova:26_1__ai_assistant_toolbar_item

Conversation

@anna-shakhova
Copy link
Copy Markdown
Contributor

No description provided.

@anna-shakhova anna-shakhova self-assigned this Apr 7, 2026
Copilot AI review requested due to automatic review settings April 7, 2026 12:08
@anna-shakhova anna-shakhova requested a review from a team as a code owner April 7, 2026 12:08
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces an AI Assistant feature hook for DataGrid/TreeList by adding aiAssistant options, wiring a controller/view pair, and registering a toolbar button in the header panel that toggles an AI chat popup.

Changes:

  • Add aiAssistant configuration (enabled, title) with per-grid default options and internal option typing.
  • Implement a new AIAssistantViewController that registers/removes a header toolbar button and delegates show/hide/toggle to the view.
  • Extend the AI chat wrapper to support toggle() and adjust default popup options.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
packages/devextreme/js/__internal/grids/tree_list/module_not_extended/ai_assistant.ts Switch to new AI assistant view/controller names and add default aiAssistant options.
packages/devextreme/js/__internal/grids/data_grid/module_not_extended/ai_assistant.ts Same as TreeList: wire new view/controller and add default aiAssistant options.
packages/devextreme/js/__internal/grids/grid_core/m_types.ts Add internal aiAssistant option typing.
packages/devextreme/js/__internal/grids/grid_core/header_panel/m_header_panel.ts Make _getToolbarButtonClass callable from outside the class (now used by AI assistant button init).
packages/devextreme/js/__internal/grids/grid_core/ai_chat/const.ts Update default popup options (shading: false).
packages/devextreme/js/__internal/grids/grid_core/ai_chat/ai_chat.ts Use internal popup implementation import and add toggle() API on AIChat.
packages/devextreme/js/__internal/grids/grid_core/ai_assistant/m_ai_assistant_view_controller.ts Remove legacy AI assistant controller implementation (replaced by new controller).
packages/devextreme/js/__internal/grids/grid_core/ai_assistant/m_ai_assistant_view_controller.test.ts Remove legacy unit tests for the old controller.
packages/devextreme/js/__internal/grids/grid_core/ai_assistant/ai_assistant_view.ts Make isVisible() strictly boolean and add toggle() delegating to AI chat.
packages/devextreme/js/__internal/grids/grid_core/ai_assistant/ai_assistant_view_controller.ts New controller registering/removing a header toolbar item and delegating show/hide/toggle.
packages/devextreme/js/__internal/grids/grid_core/ai_assistant/tests/ai_assistant_view.test.ts Update imports to match new file layout.
packages/devextreme/js/__internal/grids/grid_core/ai_assistant/tests/ai_assistant_view_controller.integration.test.ts Add integration tests for toolbar registration, option changes, a11y attribute, and delegation.

@anna-shakhova anna-shakhova force-pushed the 26_1__ai_assistant_toolbar_item branch from 21ebe3c to 94a38e7 Compare April 7, 2026 12:39
Copilot AI review requested due to automatic review settings April 7, 2026 14:14
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 5 comments.

@anna-shakhova anna-shakhova changed the title GridCore: add methods to HeaderPanel to add/remove toolbar items GridCore: add ai assistant toolbar item Apr 7, 2026
Copilot AI review requested due to automatic review settings April 7, 2026 14:57
@anna-shakhova anna-shakhova force-pushed the 26_1__ai_assistant_toolbar_item branch from f4fb1ec to ce86ab0 Compare April 7, 2026 14:57
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 18 out of 18 changed files in this pull request and generated 3 comments.

Comments suppressed due to low confidence (1)

packages/devextreme/js/__internal/grids/grid_core/ai_assistant/ai_assistant_view.ts:42

  • aiChatInstance is lazily created in _renderCore(), but it’s declared with a definite assignment assertion (!) while the methods still treat it as optional via ?./fallbacks. Consider making the field optional (AIChat | undefined) to accurately reflect its lifecycle and avoid masking initialization issues.

@anna-shakhova anna-shakhova force-pushed the 26_1__ai_assistant_toolbar_item branch from ce86ab0 to 81ee689 Compare April 7, 2026 15:25
@Alyar666 Alyar666 self-requested a review April 8, 2026 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants